package comparator;

import java.util.Comparator;

public class EmpCom implements Comparator {
    @Override
    public int compare(Object o1, Object o2) {
        Employee_2 first = (Employee_2) o1;
        Employee_2 second = (Employee_2) o2;

        if(first.age < second.age){
            return -1;
        }else if(first.age == second.age){
            if(first.name == "女"){
                return -1;
            }else{
                return 1;
            }
        }else{
            return 1;
        }
    }
}
